<html>
<!-- 聊天页面 jq方法实现 -->
<head>
<script src="jquery-3.4.1.js"></script>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
</head>
<body>
<h1>发布聊天内容</h1>
<iframe id="fr1" style="height:50px"></iframe><br>
姓名：<input type="text" name="name" id="name"><br>
内容：<textarea name="content" id="content" style="height:50px;width:300px"></textarea><br>
<input type="button" value="发送" onclick="sendMessage()">
</body>
<script type="text/javascript">
function sendMessage(){
    var name = $("[name='name']").val();
    var cont = $("[name='content']").val();
    var urlstr="do_jq.php?name="+name+"&cont="+cont;
    $("#fr1").attr("src",urlstr);
}
</script>
</html>